package com.asialjim.wechat.official.api.wechatuser;

import com.asialjim.wechat.core.api.BaseWeChatApiRes;
import com.asialjim.wechat.pojo.user.WeChatUser;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

/**
 * <h1><em>ASIAL JIM JAVA DOC</em></h1><hr/>
 * <h2>CLASS DESCRIPTION <i>[ NAME: GetWeChatUserApiResponse ]</i></h2><strong>
 * <p> get we chat user api response
 * </strong><p><p><em>Copyright &copy; Asial Jim Co., LTD</em><hr/>
 *
 * @author Asial Jim &nbsp;&nbsp; <span>Email:<a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
 * @version 1.0.0
 * @since 2021/3/16   &nbsp;&nbsp; JDK 8
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class GetWeChatUserApiResponse extends BaseWeChatApiRes<GetWeChatUserApiResponse> {
    private static final long serialVersionUID = 8470499865524759278L;

    private Integer subscribe;
    private String openid;
    private String nickname;
    private Integer sex;
    private String language;
    private String city;
    private String province;
    private String country;
    private String headimgurl;
    private Long subscribe_time;
    private String unionid;
    private String remark;
    private Integer groupid;
    private List<Integer> tagid_list;
    private String subscribe_scene;
    private Integer qr_scene;
    private String qr_scene_str;

    public WeChatUser weChatUser(){
         return WeChatUser.builder()
                .openId(openid)
                .nickName(nickname)
                .sex(sex)
                .language(language)
                .city(city)
                .province(province)
                .country(country)
                .headImgUrl(headimgurl)
                .subscribeTime(subscribe_time)
                .subscribe(subscribe)
                .unionId(unionid)
                .remark(remark)
                .groupId(groupid)
                .tagIdList(tagid_list)
                .subscribeScene(subscribe_scene)
                .qrScene(qr_scene)
                .qrSceneStr(qr_scene_str)
                .build();
    }
}
